package nl.infodation.emr.pricingservice.controller;

import java.lang.reflect.Field;

import javax.persistence.EntityManager;

import nl.infodation.emr.pricingservice.entity.Environment;

public class EnvironmentController extends AbstractBaseController<Environment, Object, Integer > {

	@Override
	public long getTotalNumberItemByCriteria(Object t) {
		return 0;
	}

	public Environment findEnvironment(Integer objectId) {
		EntityManager entityManager = null;
		try{
			entityManager = EM_FACTORY.createEntityManager();
			return entityManager.find(Environment.class, objectId);
		} catch (IllegalArgumentException illegalArgumentException) {
			LOG.error ("Error reading getObjectById.", illegalArgumentException);
		} finally {
			if (entityManager != null && entityManager.isOpen()) {
				entityManager.close();
			}
		}
		return null;
	}
	
	@Override
	protected Boolean isObject(Field field) {
		return Boolean.FALSE;
	}

	@Override
	protected Environment buildCriteria(Object search) {
		return null;
	}

}
